#pragma once

#include "Functor.h"
#include "EnginePointer.h"

template<class T>
class EngineObjFunctor : public Functor
{
protected:
	EnginePointer<T> obj;
	typedef void (T::*funcType)();
	funcType func;
public:
	AUTO_SIZE;

	EngineObjFunctor(T* o, funcType f)
	{
		obj = o;
		func = f;
	}

	void operator() () { (obj->*func)(); }
};
